package com.ben.ben_bot;

import com.ben.ben_bot.R;
import com.ben.ben_bot.R.layout;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class ListedInstruction extends ArrayAdapter<String> {
	  private final Context context;
	  private final String[] values;

	  public ListedInstruction(Context context, String[] values) {
	    super(context, R.layout.listed_instruction, values);
	    this.context = context;
	    this.values = values;
	  }

	  @Override
	  public View getView(int position, View convertView, ViewGroup parent) {
	    LayoutInflater inflater = (LayoutInflater) context
	        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	    TextView rowView = (TextView) inflater.inflate(R.layout.listed_instruction, parent, false);
	    rowView.setText(values[position]);
	    /*TextView textView = (TextView) rowView.findViewById(R.id.label);
	    ImageView imageView = (ImageView) rowView.findViewById(R.id.icon);
	    textView.setText(values[position]);
	    // Change the icon for Windows and iPhone
	    String s = values[position];
	    if (s.startsWith("iPhone")) {
	      imageView.setImageResource(R.drawable.no);
	    } else {
	      imageView.setImageResource(R.drawable.ok);
	    }
*/
	    return rowView;
	  }
}
